package com.ziroom.crm.mq.core.processor.retry.config;

import com.ziroom.crm.mq.core.config.MqConfig;
import com.ziroom.crm.mq.core.processor.retry.DefaultConsumeRetryProcessor;
import com.ziroom.crm.mq.core.processor.retry.DefaultReConsumeRetryProcessor;
import com.ziroom.crm.mq.core.retry.RetryConst;
import com.ziroom.crm.mq.core.retry.policy.CountRetryPolicy;
import com.ziroom.crm.mq.core.spi.SpiAlias;

/**
 * 用于解析配置，消费端持久化重试，数量策略
 * <p/>
 *
 * @author WeiShaoying
 * @date Created in 2020年09月16日 16:05
 * @since 1.0.0
 */
@SpiAlias(value = RetryConst.RETRY_POLICY_COUNT, group = DefaultReConsumeRetryProcessor.GROUP_RECONSUME)
public class ReConsumeCountRetryPolicy extends CountRetryPolicy {

    private static final long serialVersionUID = -5935263426421023226L;

    public ReConsumeCountRetryPolicy() {
        super(Integer.parseInt(MqConfig.getConfig(MqConfig.RETRY_RECONSUME_COUNT)));
    }
}
